package com.yf1706.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yf1706.bean.SalaryDetail;
import com.yf1706.dao.jpa.ISalaryDetailJDAO;
import com.yf1706.vo.SalaryDetailVO;

/**
 * 薪资结果
 * @author 锦涛
 */
@Service
@Transactional(rollbackFor=Exception.class)
public class SalaryDetailService {

	@Autowired
	private ISalaryDetailJDAO salaryDetailDAO;
	
	/**
	 * 添加薪资结果
	 */
	@Transactional
	public void saveSD(SalaryDetail salaryDetail) {
		salaryDetailDAO.save(salaryDetail);
	}
	
	/**
	 * 根据薪资表ID查询薪资结果
	 */
	public List<SalaryDetailVO> querySDAll(int Sid){
		return salaryDetailDAO.fingBysalaryId(Sid);
	}
}
